﻿<?xml version="1.0" encoding="utf-8" ?>
<Structure>
  <TableStructure>
    <Table Name="AVA_OIDI" Description="电子发票明细备选项目" Type="bott_Document" State="bots_User">
      <Field Name="CargoCode" Description="货物编码" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="CargoName" Description="货物名称" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="ShortName" Description="货物简码" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Stlye" Description="规格型号" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Unit" Description="单位" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Quantity" Description="数量" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Price" Description="单价" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Amount" Description="金额" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Rate" Description="税率" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="TaxAmount" Description="税额" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="IsTax" Description="含税标志" DataType="db_Alpha" SubType="st_None" EditSize="1" DefValue="N" LinkTable="" >
        <ValidValue Value="Y" Description="是" />
        <ValidValue Value="N" Description="否" />
      </Field>
    </Table>
    <Table Name="AVA_OCPY" Description="销货单位" Type="bott_Document" State="bots_User">
      <Field Name="Company" Description="名称" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="TaxNo" Description="纳税人识别码" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Bank" Description="开户行" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="CardNo" Description="账号" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Phone" Description="电话" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Address" Description="地址" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="Remarks" Description="备注" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
    </Table>
    <Table Name="AVA_OINV" Description="电子发票" Type="bott_Document" State="bots_User">
      <Field Name="CardCode" Description="客户编号" DataType="db_Alpha" SubType="st_None" EditSize="50" DefValue="" LinkTable="" />
      <Field Name="CardName" Description="客户名称" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="Amount" Description="金额" DataType="db_Float" SubType="st_Sum" EditSize="20" DefValue="" LinkTable="" />
      <Field Name="Currency" Description="币种" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="InvCurr" Description="发票币种" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="RMB" LinkTable="" />
      <Field Name="Rate" Description="汇率" DataType="db_Float" SubType="st_Rate" EditSize="8" DefValue="" LinkTable="" />

      <Field Name="InvoiceDate" Description="开票日期" DataType="db_Date" SubType="st_None" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="InvoiceNum" Description="发票号码" DataType="db_Alpha" SubType="st_None" EditSize="20" DefValue="" LinkTable="" />
      <Field Name="Invoice" Description="发票抬头" DataType="db_Alpha" SubType="st_None" EditSize="100" DefValue="" LinkTable="" />
      <Field Name="InvoiceAmount" Description="发票金额" DataType="db_Float" SubType="st_Sum" EditSize="20" DefValue="" LinkTable="" />

      <Field Name="TaxpayerNo" Description="纳税人识别号" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="TaxpayerAddress" Description="地址\电话" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="TaxpayerBank" Description="开户行" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="TaxpayerCardNo" Description="账号" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />

      <Field Name="ApplyDate" Description="申请日期" DataType="db_Date" SubType="st_None" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Apply" Description="发票申请人" DataType="db_Alpha" SubType="st_None" EditSize="10" DefValue="" LinkTable="" />
      <Field Name="Handledby" Description="经手人" DataType="db_Alpha" SubType="st_None" EditSize="100" DefValue="" LinkTable="" />
      <Field Name="Remarks" Description="发票备注" DataType="db_Memo" SubType="st_None" EditSize="4000" DefValue="" LinkTable="" />
      <Field Name="Comments" Description="单据备注" DataType="db_Memo" SubType="st_None" EditSize="4000" DefValue="" LinkTable="" />

      <Field Name="Deliver" Description="开票单位名称" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="DeliverTaxNo" Description="纳税人识别号" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="DeliverAddress" Description="地址\电话" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="DeliverBank" Description="开户行及账号" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />

      <Field Name="Cashier" Description="收款人" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Checker" Description="复核人" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Drawer" Description="开票人" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="InvoiceTaxType" Description="发票类型" DataType="db_Alpha" SubType="st_None" EditSize="1" DefValue="" LinkTable="" >  
        <ValidValue Value="P" Description="增值税专用发票（6%）" />
        <ValidValue Value="G" Description="增值税普通发（6%)" />
        <ValidValue Value="S" Description="咨询服务业发票(3%)" />
      </Field>
      <Field Name="Status" Description="状态" DataType="db_Alpha" SubType="st_None" EditSize="1" DefValue="P" LinkTable="" >
        <ValidValue Value="P" Description="正操作" />
        <ValidValue Value="O" Description="开票中" />
        <ValidValue Value="G" Description="已获取" />
        <ValidValue Value="C" Description="已开票" />
        <ValidValue Value="Q" Description="已冲销" />
        <ValidValue Value="R" Description="已冲销" />
        <ValidValue Value="D" Description="已作废" />
      </Field>
      <Field Name="TaxArea" Description="开票单位" DataType="db_Alpha" SubType="st_None" EditSize="2" DefValue="" LinkTable="" >
        <ValidValue Value="BJ" Description="北京海翔" />
        <ValidValue Value="SH" Description="上海海翔" />
        <ValidValue Value="GZ" Description="广州海翔" />
      </Field>
      
    </Table>
    <Table Name="AVA_INV1" Description="电子发票明细" Type="bott_DocumentLines" State="bots_User">
      <Field Name="CargoCode" Description="货物编码" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="CargoName" Description="货物名称" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="ShortName" Description="货物简码" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Stlye" Description="规格型号" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Unit" Description="单位" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Quantity" Description="数量" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Price" Description="单价" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Amount" Description="金额" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Rate" Description="税率" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="TaxAmount" Description="税额" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
      <Field Name="IsTax" Description="含税标志" DataType="db_Alpha" SubType="st_None" EditSize="1" DefValue="Y" LinkTable="" >
        <ValidValue Value="Y" Description="是" />
        <ValidValue Value="N" Description="否" />
      </Field>
      <Field Name="AmountTotal" Description="合计" DataType="db_Float" SubType="st_Sum" EditSize="8" DefValue="" LinkTable="" />
    </Table>
    <Table Name="AVA_INV2" Description="对账单明细" Type="bott_DocumentLines" State="bots_User">
      <Field Name="Direction" Description="方向" DataType="db_Alpha" SubType="st_None" EditSize="1" DefValue="" LinkTable="" >
        <ValidValue Value="I" Description="应收" />
        <ValidValue Value="O" Description="应付" />
      </Field>
      <Field Name="BaseEntry" Description="对账单" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="CardName" Description="结算单位" DataType="db_Alpha" SubType="st_None" EditSize="254" DefValue="" LinkTable="" />
      <Field Name="Currency" Description="币种" DataType="db_Alpha" SubType="st_None" EditSize="30" DefValue="" LinkTable="" />
      <Field Name="Rate" Description="汇率" DataType="db_Float" SubType="st_Sum"  EditSize="8" DefValue="" LinkTable="" />
      <Field Name="Amount" Description="金额" DataType="db_Float" SubType="st_Sum"  EditSize="8" DefValue="" LinkTable="" />
    </Table>
  </TableStructure>
  <ObjectStructure>
    <Object Code="InvoiceDetailItem" Name="电子发票明细备选项目" TableName="AVA_OIDI" ObjectType="boud_Document" LogTableName="AVA_OIDI_LOG" CanFind="Yes" CanCancel="Yes" CanClose="No" CanDelete="No" CanYearTransfer="Yes" ManageSeries="Yes">
      <ChildTables>
      </ChildTables>
      <FindColumns >
        <FindColumn ColumnAlias="DocEntry" ColumnDescription="编号" />
      </FindColumns>
      <FormColumns />
    </Object>
    <Object Code="AVA_Company" Name="销货单位" TableName="AVA_OCPY" ObjectType="boud_Document" LogTableName="AVA_OCPY_LOG" CanFind="Yes" CanCancel="Yes" CanClose="No" CanDelete="No" CanYearTransfer="Yes" ManageSeries="Yes">
      <ChildTables>
      </ChildTables>
      <FindColumns >
        <FindColumn ColumnAlias="DocEntry" ColumnDescription="编号" />
      </FindColumns>
      <FormColumns />
    </Object>
    <Object Code="AVA_Invoice" Name="电子发票" TableName="AVA_OINV" ObjectType="boud_Document" LogTableName="AVA_OINV_LOG" CanCancel="Yes" CanClose="Yes" CanDelete="No" CanYearTransfer="No" ManageSeries="No">
      <ChildTables>
        <ChildTable TableName="AVA_INV1" LogTableName="AVA_INV1_LOG" />
        <ChildTable TableName="AVA_INV2" LogTableName="AVA_INV2_LOG" />
      </ChildTables>
      <FindColumns>
        <FindColumn ColumnAlias="DocEntry" ColumnDescription="编号" />
      </FindColumns>
      <FormColumns />
    </Object>
  </ObjectStructure>
</Structure>
